<?php

namespace apiend\modules\attach\models;

use Yii;

/**
 * PictureSearch represents the model behind the search form about [[\app\models\FanasocMemberApply]].
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class PictureSearch extends \common\models\shop\ShopAttachment {

    /**
     * @var string 关键字
     */
    public $keyword;

    /**
     * @var string 关键字
     */
    public $album_id;

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['album_id', 'keyword'], 'safe'],
        ];
    }

    /**
     * Searching member apply
     * @param  array $params
     * @return \yii\data\ActiveDataProvider
     */
    public function buildQuery() {
        $query = static::find()->alias('t')->active();
        $query->andFilterWhere([
            'group_id' => $this->album_id
        ]);
        $query->debug();
        return $query;
    }

}
